//
//  RequestAPIExample.h
//  Growth
//
//  Created by Hobo.Chen on 1/5/12.
//  Copyright 2011 MEETStudio. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface RequestAPIExample: NSObject {

}

#pragma mark log
//login

+ (NSMutableURLRequest *)login_openRequestWithUsr:(NSString *)usr 
                                              pwd:(NSString *)pwd;

+ (NSMutableURLRequest *)logginRequestWithUsr:(NSString *)usr 
										  pwd:(NSString *)pwd;

//register
+ (NSMutableURLRequest *)registerRequestWithEmail:(NSString *)email  
											  pwd:(NSString *)pwd  usr:(NSString *)usr;


#pragma mark user
//user
+ (NSMutableURLRequest *)requestUserWithUserID:(NSString *)userid  skey:(NSString *)skey;

//friend list
+ (NSMutableURLRequest *)requestFriendListWithUserID:(NSString *)userid  pid:(NSString *)pid
												  ps:(NSString *)ps     skey:(NSString *)skey;

#pragma mark note
// note
+ (NSMutableURLRequest *)noteRequestWithNoteID:(NSString *)noteid  skey:(NSString *)skey;

//share note list
+ (NSMutableURLRequest *)shareNoteListWithUID:(NSString *)uid  pid:(NSString *)pid 
										   ps:(NSString *)ps  skey:(NSString *)skey;

//hot note list
+ (NSMutableURLRequest *)hotNoteListWithUID:(NSString *)uid  pid:(NSString *)pid 
										   ps:(NSString *)ps  skey:(NSString *)skey  hotType:(NSString *)type;

//near note list
+ (NSMutableURLRequest *)nearNoteListWithUID:(NSString *)uid  pid:(NSString *)pid 
										  ps:(NSString *)ps  skey:(NSString *)skey  x:(float)x_gps  y:(float)y_gps;

#pragma mark comment
//comment list
+ (NSMutableURLRequest *)commentListWithNoteID:(NSString *)noteid  pid:(NSString *)pid
											ps:(NSString *)ps     skey:(NSString *)skey;


#pragma mark action
//like
+ (NSMutableURLRequest *)likeWithNoteID:(NSString *)noteid    skey:(NSString *)skey;

//share
+ (NSMutableURLRequest *)shareWithNoteID:(NSString *)noteid   skey:(NSString *)skey
									uids:(NSString *)uids;

//取消分享
+ (NSMutableURLRequest *)cancelShareWithNoteID:(NSString *)noteid uids:(NSString *)uids skey:(NSString *)skey ;


//已分享好友id list
+ (NSMutableURLRequest *)noteSharedUserIDListWith:(NSString *)noteid skey:(NSString *)skey;

//add friend
+ (NSMutableURLRequest *)addFriendWithUid:(NSString *)uid     skey:(NSString *)skey;

//accept friend
+ (NSMutableURLRequest *)acceptFriendWithUids:(NSString *)uids    skey:(NSString *)skey;

//reject friend
+ (NSMutableURLRequest *)rejectFriendWithUids:(NSString *)uids    skey:(NSString *)skey;

//look for friend :  site:qq/sina/renren
+ (NSMutableURLRequest *)lookForFriendWithName:(NSString *)name    site:(NSString *)site
										  skey:(NSString *)skey;

//delete friend
+ (NSMutableURLRequest *)deleteFriendWithUid:(NSString *)uid  skey:(NSString *)skey;

//forget password
+ (NSMutableURLRequest *)forgetPasswordWithEmail:(NSString *)email  
											skey:(NSString *)skey;


//apply to be friend list
+ (NSMutableURLRequest *)applyFriendListWithPid:(NSString *)pid    ps:(NSString *)ps
										   skey:(NSString *)skey;

//collect
+ (NSMutableURLRequest *)collectWithNoteID:(NSString *)noteid    skey:(NSString *)skey;


#pragma mark search
//user search
+ (NSMutableURLRequest *)searchUserWithWord:(NSString *)word   pid:(NSString *)pid
										   ps:(NSString *)ps      skey:(NSString *)skey;

//tag search
+ (NSMutableURLRequest *)searchTagWithWord:(NSString *)word   pid:(NSString *)pid
										   ps:(NSString *)ps      skey:(NSString *)skey;

//note search
+ (NSMutableURLRequest *)searchNoteWithWord:(NSString *)word   pid:(NSString *)pid
										   ps:(NSString *)ps      skey:(NSString *)skey;


#pragma mark sync
// data:category/note/tag/attachment;  zip:true/false;
+ (NSMutableURLRequest *)syncRequestWithData:(NSString *)data    lastSyncTime:(NSString *)lastTime
										 zip:(NSString *)zipbool  skey:(NSString *)skey;

// data:category/note/tag/attachment;  zip:true/false;
+ (NSMutableURLRequest *)syncUploadWithXMLData:(NSData *)data   zip:(NSString *)zipbool    
										  skey:(NSString *)skey    data:(NSString *)type;

// zip:true/false
+ (NSMutableURLRequest *)syncUserRequestWithZip:(NSString *)zipbool    skey:(NSString *)skey;

// zip:true/false 
+ (NSMutableURLRequest *)syncUserUploadWithXMLData:(NSData *)data   zip:(NSString *)zipbool    
										 skey:(NSString *)skey;

// zip:true/false
+ (NSMutableURLRequest *)syncSingleNoteUploadWithXMLData:(NSData *)data    zip:(NSString *)zipbool    
													skey:(NSString *)skey;

// request resource,直接取得图片文件
+ (NSMutableURLRequest *)syncResourceWithNoteID:(NSString *)noteid   name:(NSString *)filename;

@end
